home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows News 2010 Summer - Disc 1
/
WN_Ete2010_CD1.iso
/
Onglet5
/
Weezo
/
Weezo setup.exe
/
{code_appDir}
/
www
/
local
/
loadFfmpeg.php
< prev
next >
Wrap
PHP Script
|
2010-05-19
|
3KB
|
79 lines
<?php
/**
* Load and install GPL version of Ffmpeg
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category NA
* @package NA
* @author Nicolas Bruley / Peer 2 World <contact@weezo.net>
* @copyright 2005-2009 Nicolas Bruley / Peer 2 World
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id:$
* @link http://www.weezo.net
* @since File available since Release 1.1.1
*/
require(INCLUDE_DIR.'outputFunctions.php');
/**
* Display error page and exit
*
*/
function displayErrorPage(){
outLFPupdatePage('mainCaption','<span class="warning">'.cfCaption('genError').'</span>');
outLFPupdatePage('cancelButtonOuter',outButton(cfCaption('genCancel'),'javascript:wl.UICommand(\'close\')',outIcon('cancel'),false,false,'style="margin-bottom:5px"'));
@unlink(cfAppDataDir().'/temp/ffmpeg.7z');
exit;
}
$_ENV['configurationEnvironment']='application';
// Display complete page
if(!isset($_GET['proceed'])){
cfInsertHEAD(false);
echo '<meta wintitle="Weezo"></meta>';
echo '<meta width="440x175"></meta></head><body onload="document.proceedForm.submit()">';
echo outDivFrame('frame2',false,'margin-top:10px');
echo '<div class="frame1Header">';
echo outImage(outIcon('ffmpeg'),false,false,'float:left; margin-right:1em').'Ffmpeg';
echo '</div><br/><div id="mainCaption">'.cfCaption('updateVersionDownloading').'</div><br/>';
?>
<form name="proceedForm" method="GET" action="<?php echo $_SERVER['PHP_SELF'];?>" style="display:none"><input name="proceed" value="1">
<?php if(isset($_GET['silentInstall'])) echo '<input name="silentInstall" value="1">';?>
</form>
</div></body>
<?php
exit;
}
// Display download page
cfInsertHEAD(false);
echo '<meta wintitle="Weezo"></meta>';
echo '<meta width="440x175"></meta></head><body>';
echo outDivFrame('frame2',false,'margin-top:10px');
echo '<div class="frame1Header">';
echo outImage(outIcon('ffmpeg'),false,false,'float:left; margin-right:1em').'Ffmpeg';
echo '</div><br/><div id="mainCaption">'.cfCaption('updateVersionDownloading').'</div><br/>';
// Download file
if(!outLoadFileProgress(DOWNLOAD_SITE.'/download.php?plugin=ffmpeggpl',cfAppDataDir().'/temp/ffmpeg.7z')) displayErrorPage();
// Extract with PHP, no license display (silent upgrade, user already accepted license)
if(isset($_GET['phpInstall'])){
$decExe=cfAppBinDir().'/7zDec.exe e "'.cfAppDataDir().'/temp/ffmpeg.7z"';
}
// Install module with UI
cfServerSendCommand('installModule file="'.cfAppDataDir().'/temp/ffmpeg.7z"'.((isset($_GET['silentInstall']))?' silentInstall="true"':''),true);
echo '<script type="text/javascript">wl.UICommand("close")</script>';
exit;
?>